package ch04;

/**
 * Created by 其 on 2016/3/20.
 */
import java.util.Arrays;

public class BubbleSort{
    public static void main(String[] args){
        int[] number = {70, 80, 31, 37, 10, 1, 48, 60, 33, 80};
	/*
		int temp;
		for(int j=0; j < number.length-1; j++){
			for(int i=0; i < number.length-1-j; i++){
				if(number[i] > number[i+1]){
					temp = number[i];
					number[i] = number[i+1];
					number[i+1] = temp;
				}
			}
		}
	*/
        Arrays.sort(number);
        for(int num : number){
            System.out.printf("%3d",num);
        }
        System.out.println();
    }
}
